/*!
* =====================================================
* Name: custom.scss
* Author: Alvin
* Version: 1.0.0
* Date: 2018-07-27 
* =====================================================
*/

* {
  margin: 0;
  padding: 0;
}

*,
*:before,
*:after {
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  max-height: 100000px;
  box-sizing: border-box;
}

//全局颜色
$color_main: #ff3399;
$color_bg_gray: #f5f5f9;
$color_white: #fff;
$color_text: #000;
$color_gray_small: #aaa;
$color_gray_product: #7f7f7f;
$color_gray_mid: #666;
$color_gray_big: #555;
$border: #8c8c8c;
$btn_dialog: #eda732;
$font_title: 0.36rem;
$font_normal: 0.32rem;
$font_small: 0.24rem;
html,
body {
  height: 100%;
  overflow: hidden;
}
body {
  background: $color_bg_gray;
  margin: 0;
  font-family: "Helvetica Neue", Helvetica, "Hiragino Sans GB",
    "Microsoft YaHei", Arial, sans-serif;
  //解决滚动、滑动时候页面卡
  -webkit-overflow-scrolling: touch;
  overflow-scrolling: touch;
  //禁止选中文字
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  //禁止横竖屏时内容自动调整大小
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  text-size-adjust: 100%;
  max-width: 800px;
  margin: 0 auto;
}

a {
  text-decoration: none;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

button,
input,
textarea,
input:active,
input:focus,
button,
input:hover,
input[type="button"] {
  //清除点击时的阴影
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  //表单元素的默认外观重置
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  border-radius: 0;
  outline: none;
  box-sizing: border-box;
  //手机上的line-height不能写成和height的值一样，会出现再次输入光标靠上的现象
  line-height: normal;
  border: 0;
}

a:active,
a:focus,
input:active {
  outline: none;
}

//去除谷歌浏览器input自动填充黄色背景
input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0px 1000px white inset !important;
}

ol,
li {
  list-style: none;
}

img {
  border: 0;
  //禁止微信里面点图片弹出预览
  pointer-events: none;
  //禁止长按保存或拷贝图像
  -webkit-touch-callout: none;
}

.hide {
  display: none;
}

.navbar {
  color: $color_white;
  background: $color_main;
  height: 0.88rem;
  line-height: 0.88rem;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 999;
  max-width: 800px;
  .back {
    font-size: 0.28rem;
    position: absolute;
    left: 0.2rem;
    height: 100%;
    z-index: 99;
    color: $color_white;
  }
  .title {
    font-size: 0.36rem;
    width: 60%;
    margin: 0 auto;
    text-align: center;
  }
}
.page-bottom {
  color: #d7d7d7;
  text-align: center;
  font-size: 0.26rem;
  margin: 0.4rem auto;
}
//页面
.container {
  height: 100%;
  overflow-y: auto;
  &.start {
    width: 100%;
    overflow: hidden;
  }
  &.hasBar {
    margin-top: 0.88rem;
    height: calc(100% - 0.88rem);
  }
  &.tv,
  &.home,
  &.my {
    height: calc(100% - 0.98rem);
  }
}

//弹出层
.dialog {
  display: none;
  background: rgba(0, 0, 0, 0.8) !important;
  background: #000;
  filter: alpha(opacity=80);
  width: 100%;
  height: 100%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 99;
  overflow: hidden;
}

.dialog-content {
  width: 80%;
  height: auto;
  max-height: 70%;
  overflow-y: auto;
  background: #fff;
  position: absolute;
  margin: auto;
  padding: 0.3rem;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 0.14rem;
  h2 {
    font-size: $font_title;
    color: #333333;
    font-weight: bold;
    text-align: center;
    margin: 0.3rem auto;
  }
}

.dialog-body {
  margin: 0.3rem auto;
  max-width: 90%;
  font-size: 0.24rem;
  .role {
    li {
      margin-bottom: 0.2rem;
      &.small {
        font-size: 0.2rem;
      }
    }
  }
}

input {
  display: block;
  width: auto;
  font-size: 0.28rem;
  color: #000;
  height: 0.75rem;
  line-height: 0.55rem;
  padding: 0 0.4rem;
  &.btn_dialog {
    background: $btn_dialog;
    margin: 0.4rem auto 0.2rem auto;
    border-radius: 0.14rem;
  }
}
.btn-skip {
  border: 1px solid $color_white;
  color: $color_white;
  font-size: 0.18rem;
  position: absolute;
  top: 0.2rem;
  right: 0.2rem;
  z-index: 999;
  padding: 0.08rem 0.2rem;
  border-radius: 0.14rem;
  opacity: 0.8;
}
.swiper-container {
  width: 100%;
  height: 100%;
  .swiper-slide {
    text-align: center;
    width: 100%;
    /* Center slide text vertically */
    display: -webkit-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    -webkit-justify-content: center;
    justify-content: center;
    -webkit-box-align: center;
    -ms-flex-align: center;
    -webkit-align-items: center;
    align-items: center;
    img {
      width: 100%;
      height: 100%;
    }
  }
  &.start {
    &.opacity {
      opacity: 0;
      z-index: -1;
    }
    &.swiper-container-horizontal > .swiper-pagination-bullets {
      bottom: 0.4rem;
    }
    .swiper-pagination-bullet-active {
      background: $color_white;
    }
  }
  &.home-top {
    padding: 0 0.2rem;
    margin: 0.3rem auto 0.15rem;
    height: 2.3rem;
    .swiper-slide {
      overflow: hidden;
      position: relative;
      height: 1.96rem;
      border-radius: 0.14rem;
      img {
        border-radius: 0.14rem;
      }
    }
    &.swiper-container-horizontal > .swiper-pagination-bullets {
      bottom: 0rem;
    }
    .swiper-pagination-bullet {
      width: 6px;
      height: 6px;
    }
    .swiper-pagination-bullet-active {
      background: $color_main;
      width: 20px;
      border-radius: 0.1rem;
    }
    a {
      text-decoration: none;
      &:active {
        outline: none;
      }
    }
  }
}
.swiper-container.home-top,
.detail-box .header,
.banner {
  .text {
    color: $color_main;
    width: 100%;
    text-align: right;
    position: absolute;
    bottom: 0.2rem;
    right: 0.2rem;
    font-weight: bold;
    font-size: 0.46rem;
    line-height: 1.5;
    span {
      display: block;
      font-size: 0.36rem;
      line-height: 1.2;
    }
  }
}
.gray {
  color: $color_gray_product !important;
}
.white {
  color: $color_white !important;
}
.swiper-container.home-top .swiper-slide,
.productList .content .item,
.productList .title .right,
.btn-buy,
.back {
  &:active {
    opacity: 0.8;
  }
}
//启动页
.loading {
  width: 100%;
  height: 100%;
  position: absolute;
  display: block;
  top: 0;
  left: 0;
  z-index: 9999;
}
// 首页
.productList {
  background: $color_white;
  padding: 0.25rem 0 0.1rem;
  margin: 0 0.2rem 0.3rem;
  border-radius: 0.14rem;
  .title {
    position: relative;
    padding: 0 0.2rem;
    margin-bottom: 0.25rem;
    .left {
      color: $color_main;
      font-weight: bold;
      font-size: 0.36rem;
      width: 65%;
    }
    .right {
      color: $color_gray_small;
      position: absolute;
      right: 0.2rem;
      top: 0.05rem;
      font-size: 0.26rem;
    }
  }
  .content {
    display: flex;
    flex-wrap: wrap;
    .item {
      width: calc((100% - 1.2rem) / 3);
      margin: 0 0.2rem 0.2rem;
      img {
        width: 100%;
        display: block;
        border-radius: 0.14rem 0.14rem 0 0;
      }
      .img-box {
        height: 2.6rem;
        overflow: hidden;
        position: relative;
        div {
          font-size: 0.36rem;
          font-weight: bold;
          position: absolute;
          top: 0.1rem;
          left: 0.1rem;
          z-index: 3;
          width: 1rem;
          line-height: 1.2;
          &.en-long {
            width: 1.2rem;
          }
          &.en-short {
            width: 0.9rem;
          }
        }
      }
      .name {
        text-align: center;
        background: $color_main;
        color: $color_white;
        font-size: 0.18rem;
        line-height: 1;
        padding: 0.1rem 0.02rem;
      }
      &.hideOther {
        width: 100%;
        text-align: center;
        color: $color_gray_small;
        font-size: 0.26rem;
        margin: 0;
      }
    }

    &.showThree {
      .item {
        display: none;
        &:nth-child(1),
        &:nth-child(2),
        &:nth-child(3) {
          display: block;
        }
        &.hideOther {
          display: none;
        }
      }
    }
  }
  &.video-list {
    .tips {
      margin: 0 0.2rem;
      font-size: 0.22rem;
      div {
        color: $color_gray_small;
        margin-bottom: 0.1rem;
      }
      span {
        color: $color_gray_big;
      }
    }
    .video-item {
      width: 100%;
      margin: 0.3rem 0.2rem 0.3rem;
      .video-box {
        height: 3rem;
        overflow: hidden;
        border-radius: 0.14rem;
        position: relative;
        .play {
          position: absolute;
          top: 50%;
          left: 50%;
          width: 1.2rem;
          height: 1.2rem;
          margin: -0.6rem -0.6rem;
        }
        .times {
          position: absolute;
          right: 0.2rem;
          bottom: 0.2rem;
          font-size: 0.24rem;
          opacity: 0.4;
        }
      }
      .video-title {
        display: flex;
        margin-top: 0.1rem;
        .icon {
          width: 0.6rem;
          height: 0.6rem;
          margin-right: 0.2rem;
        }
        .tit {
          width: 100%;
          font-size: 0.26rem;
          color: $color_gray_product;
          line-height: 1.3;
          span {
            font-size: 0.22rem;
            color: $color_gray_small;
            display: block;
          }
        }
        .right {
          font-size: 0.24rem;
          color: $color_gray_small;
          text-align: right;
          min-width: 1.2rem;
          img {
            display: inline-block;
            width: 0.28rem;
            margin-right: 0.1rem;
          }
        }
      }
    }
  }
}
// Tab
.tab-list {
  display: flex;
  margin: 0.2rem auto 0.2rem;
  .tab-item {
    width: 25%;
    font-size: 0.28rem;
    color: $color_gray_small;
    font-weight: bold;
    text-align: center;
    span {
      border-bottom: 0.03rem solid transparent;
      padding-bottom: 0.04rem;
    }
    &.active {
      color: $color_main;
      span {
        border-color: $color_main;
      }
    }
  }
}
// 港湾TV
.tv {
}
// 我的
.my {
  .user-info{
    margin: 0.2rem;
    background: $color_white;
    border-radius: 0.14rem;
    height: 2.56rem;
    text-align: center;
    line-height: 2.56rem;
    font-size: 0.28rem;
    color: $color_gray_small;
    img{
      width: 1rem;
      height: 1rem;
      margin-right: 0.3rem;
      vertical-align: middle;
    }
  }
  .tab-list {
    width: 70%;
    .tab-item {
      width: 33.333333%;
    }
  }
  .order-list{
    background: $color_white;
    border-radius: 0.14rem;
    min-height: 3.36rem;
    margin: 0.2rem;
    .no-data{
      line-height: 3.36rem;
      font-size: 0.28rem;
      text-align: center;
      color: $color_gray_small;
    }
  }
}
// 中间banner
.banner {
  position: relative;
  margin: 0 0.2rem 0.3rem;
  max-width: 800px;
  img {
    width: 100%;
    height: 1.4rem;
    border-radius: 0.14rem;
  }
  .text {
    right: auto;
    left: 0.2rem;
    top: 0.3rem;
    font-size: 0.24rem;
    text-align: left;
    width: calc(100% - 0.4rem);
    line-height: 1.5;
    span {
      font-size: 0.4rem;
    }
  }
}
// 幻灯片详情页
.detail-box {
  background: $color_white;
  border-radius: 0.14rem;
  margin: 0.2rem;
  padding: 0.2rem;
  min-height: calc(100% - 0.4rem);
  .header {
    position: relative;
    img {
      width: 100%;
    }
  }
  .title {
    font-size: 0.36rem;
    font-weight: bold;
    color: $color_gray_mid;
    margin: 0.25rem auto 0.3rem;
  }
  .content {
    font-size: 0.28rem;
    color: $color_gray_mid;
    p {
      text-indent: 0.56rem;
      margin-bottom: 0.2rem;
    }
  }
  &.product {
    margin-bottom: 1.16rem;
    .title {
      margin-top: 0;
    }
    .content {
      img {
        width: 100%;
        display: block;
        margin-bottom: 0.3rem;
      }
    }
  }
}

.btn-buy {
  color: $color_white;
  background: $color_main;
  height: 0.88rem;
  line-height: 0.88rem;
  position: fixed;
  width: 100%;
  bottom: 0;
  z-index: 999;
  text-align: center;
  font-size: 0.36rem;
  max-width: 800px;
  span {
    font-size: 0.48rem;
  }
}
// 底部bar
.nav-bar {
  border-top: 0.01rem solid #d7d7d7;
  width: 100%;
  .box {
    width: 70%;
    margin: 0 auto;
    display: flex;
  }
  .menu {
    padding: 0.1rem;
    color: $color_gray_small;
    font-size: 0.2rem;
    text-align: center;
    width: 33.33333333%;
    img {
      height: 0.4rem;
      margin: 0 auto 0.05rem;
    }
    .on {
      display: none;
    }
    .off {
      display: block;
    }
    &.current {
      color: $color_main;
      .on {
        display: block;
      }
      .off {
        display: none;
      }
    }
  }
}
//自适应
@media screen and (max-width: 320px) {
}
